package com.xiaoyu.lanling.feature.report.viewholders

import `in`.srain.cube.views.list.ViewHolderBase
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.xiaoyu.lanling.R
import com.xiaoyu.lanling.event.report.ReportPublishAddMediaEvent
import com.xiaoyu.lanling.feature.report.datamodels.ReportMediaItemBase

class ReportMediaAddViewHolder : ViewHolderBase<ReportMediaItemBase>() {

    override fun createView(layoutInflater: LayoutInflater, parent: ViewGroup): View? {
        val view = layoutInflater.inflate(R.layout.moment_publish_add_item, parent, false)
        view.setOnClickListener(sOnClickHandler)
        return view
    }

    override fun showData(position: Int, itemData: ReportMediaItemBase) {}

    companion object {

        private val sOnClickHandler = View.OnClickListener { ReportPublishAddMediaEvent().post() }
    }
}
